import { createRouter, createWebHistory } from 'vue-router'
import Home from '@/components/Home.vue'
import Insert from '@/components/Insert.vue'
import Update from '@/components/Update.vue'

const routes = [
  { path: '/', component: Home },
  { path: '/insert', component: Insert },
  { path: '/update/:id?', name: 'update', component: Update },
  { path: '/sort', component: Home } // 这里可以替换为实际的排序组件
]

const router = createRouter({
  history: createWebHistory(),
  routes
})

export default router
